<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'questionario-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note">Campos marcados com <span class="required">*</span> são obrigatórios.</p>

	<?php echo $form->errorSummary($model); ?>

        <fieldset>
            
            <legend>Informações Gerais</legend>
            
            <div class="row">
                    <?php echo $form->labelEx($model,'nome'); ?>
                    <?php echo $form->textField($model,'nome',array('size'=>45,'maxlength'=>45)); ?>
                    <?php echo $form->error($model,'nome'); ?>
            </div>

            <div class="row">
                    <?php echo $form->labelEx($model,'versao'); ?>
                    <?php echo $form->textField($model,'versao'); ?>
                    <?php echo $form->error($model,'versao'); ?>
            </div>

            <div class="row">
                    <?php echo $form->labelEx($model,'descricao'); ?>
                    <?php echo $form->textArea($model,'descricao',array('size'=>60,'maxlength'=>200,'rows'=>'3','cols'=>'50')); ?>
                    <?php echo $form->error($model,'descricao'); ?>
            </div>

            <?php if(!$model->isNewRecord): ?>
                <div class="row">
                        <?php echo $form->labelEx($model,'situacao'); ?>
                        <?php echo $form->dropDownList($model,'situacao',array('0'=>'Inativo','1'=>'Ativo')); ?>
                        <?php echo $form->error($model,'situacao'); ?>
                </div>
            <?php else: ?>
                <div class="row">
                        <?php echo $form->hiddenField($model,'situacao'); ?>
                </div>
            <?php endif; ?>
            
        </fieldset>
                
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Salvar' : 'Salvar Alterações'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
